-
-
Notifications
You must be signed in to change notification settings - Fork 102
[Agent] Add various tools for enhanced functionality #549
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
1f306fa
to
f9872b4
Compare
public function __invoke( | ||
#[With(maximum: 500)] | ||
string $query, | ||
int $maxResults = 10, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minimum 1?
* }> | ||
*/ | ||
public function __invoke( | ||
#[With(maximum: 500)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maximum length? in this case maximum
is not right
We need tests, but before I would like to discuss with @chr-hertel how to proceed with so many new tools |
00968a5
to
0f17e4a
Compare
oh wow, @matyo91, this scares me :D i mean it's great, but how did you ensure all of the implementations work or is it just vibe coded? Edit: Oh, you wrote "Tools are not tested" ... sorry |
Sure, it's vibe coding implemented : transliterated from Typescript to Symfony |
afd74ce
to
4de8d4f
Compare
file_put_contents($scriptPath, $script); | ||
|
||
// Execute the Playwright script using exec | ||
$command = "npx playwright test " . escapeshellarg($scriptPath) . " 2>&1"; | ||
$output = []; | ||
$returnCode = 0; | ||
exec($command, $output, $returnCode); | ||
|
||
// Clean up | ||
unlink($scriptPath); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not really the Symfony's standard when it comes to run an external process.
If same code exist among other added tools, I think it would be better to rethink the way we should to provide tools (and/or necessary code (boilerplate, helpers…) to let users create their own tools).
WDYT @OskarStark @chr-hertel?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, this one needs a re-write : https://whitespace.dev/articles/getting-started-with-playwright-in-php
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And probably many other ones. But, unfortunately, we don't have the human bandwidth to review such a PR with ~20k changes.
dd1f6ed
to
6218e58
Compare
By putting a little aside, I would like brainstorm about what Symfony AI could provide to users to built their own tools easily.
Based on this list, I'm convinced that it would worth it to provide useful helpers, abstract class, or starter kit, call it whatever you want, instead of providing an endless list of tools that will quickly become unmaintainable and uncoverable with tests. For these reasons, I would close this PR in favor of an RFC issue to discuss how improve the DX of building Tools. |
Ok @welcoMattic the PR could last for history and adapted in the futur to the new setup structure |
*/ | ||
public function __invoke( | ||
string $pageId, | ||
#[With(maximum: 63206)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we ned to use public ?int $maxLength = null, here same for other length checks
f4f9370
to
e12faef
Compare
ce45c4c
to
72f5146
Compare
350d348
to
ebb01c9
Compare
7228f92
to
a78c09d
Compare
a78c09d
to
0cf8262
Compare
This PR gives a great overview ; but I assume, if accepted, tool should be added one by one in separated PR for easier review/tests (?) |
Yes only one by one with example, tests and correct response fixtures from these apis |
Just an opinion from my side. A lot of these tools are already exposed as MCP servers (either official/community), for the discovery and registration of these tools, MCP registries are popping up everywhere so I'm a bit sceptical of adding / maintaining code based tools here. Not sure how good MCP integration is on the agent , can it already use MCP tools if not that might be a better idea than redefining tools already defined elsewhere. |
My point of view is that I wouldn't integrate tools without real tests and a working example. So thanks @matyo91 for your impulse and work here - i guess we can use it as reference/blue print/starting point for dedicated PRs per tool and integration. I'm fine with keeping this as a draft for now, or closing it. your call. |
You're right about stdio-based MCP servers requiring different runtime infrastructure. However, the landscape is shifting toward remote HTTP-based MCP servers. So from a runtime perspective, both are just HTTP calls from your agent - no additional processes to manage. Major SaaS companies are already providing hosted MCP servers: GitHub, Stripe, Linear, Asana, Atlassian, PayPal, Intercom, and others have launched remote servers. Manual tools still have their place for services without MCP servers (Wikipedia, internal APIs, etc.) or when you need maximum control over the integration. The infrastructure argument against MCP made sense when it meant managing separate processes, but with hosted servers, it's becoming the easier path for major SaaS integrations. |
Interesting, If there is a way to make mcp tools auto discoverable then there is a way to implement plenty of them just by providing a url. I did an example to dynamically generate tools. This time it was provided by an api that list endpoints calls https://github.com/matyo91/composio-mcp |
👀 Lots of tools can be added from https://github.com/langchain-ai/langchain-community/tree/main/libs/community/langchain_community/tools
🔍 Search & Discovery Tools
🤖 AI & Machine Learning Tools
💼 Business & Productivity Tools
💰 Finance & Data Tools
🌐 Social & Communication Tools
🔧 Development & Infrastructure Tools
🎨 Creative & Media Tools
🔐 Security & Workflow Tools
📱 Specialized Services
📊 Analytics & Monitoring Tools